export interface User {
  id: number
  username: string
  email?: string
  avatar?: string
  phonenumber?: string
  phone?: string
  nickname?: string
  gender?: string
  birthday?: string
  bio?: string
  roles?: string[]  // 用户角色列表
  role_display?: string  // 角色显示名称
  is_active?: boolean  // 用户状态
  first_name?: string  // 姓名
  date_joined?: string  // 创建时间
}

export interface RegisterResponseData {
  id: number
  username: string
  email?: string
  roles?: string[]
  role_display?: string
}

export interface LoginForm {
  username: string
  password: string
  remember?: boolean
}

export interface RegisterForm {
  username: string
  password: string
  confirmPassword?: string
  email?: string
  phonenumber?: string
}

export interface UpdateProfileForm {
  email?: string
  phonenumber?: string
  nickname?: string
  gender?: string
  birthday?: string
  bio?: string
}

export interface ChangePasswordForm {
  oldPassword: string
  newPassword: string
  confirmPassword: string
}

export interface ApiResponse<T = any> {
  code: number
  message: string
  data?: T
}